use http;
pub enum Language {
    Chinese,
    English
}

pub struct Text {
    language : Language,
    text : String,
}

pub trait Translator {
    fn get_api_name(&self) -> &String;
    fn get_api_version(&self) -> &String;
    fn translate(&self, from : &Text) -> Text;
}

pub struct BaiduAPI {
    name : String,
    version : String,
}

impl Translator for BaiduAPI {
    fn get_api_name(&self) -> &String{
        &self.name
    }

    fn get_api_version(&self) -> &String{
        &self.version
    }

    fn translate(&self, from : &Text) -> Text {
        todo!()
    }
}